#pragma once
#ifndef JPGLOADER_H_
#define JPGLOADER_H_

#include <vector>
#include <thread>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include "common.h"

class jpgLoader
{
private:
    const unsigned type;
    const unsigned nThread;
    const unsigned imgSize;
    zq_queue queue;
    counter_mt counter;
    std::vector<std::thread> workers;
public:
    jpgLoader(unsigned nT, unsigned iS, unsigned tp);
    ~jpgLoader();
    void start(unsigned nB);
    void load(const std::vector<std::string>& paths, pybind11::buffer pybuf);
    void wait();
};

#endif
